Skip to main content

Makefile Reference

Every target below runs inside the tooling container (see Getting Started). Most fetch secrets from Vaultwarden, so run eval "$(make unlock-bw)" first in the same terminal. The last column shows which Vaultwarden items each target reads.

Admin-only

Every target here changes production directly. There's no staging environment. If you're not an admin, open a pull request and ask an admin to run the target. See Making Changes.

Tooling​

These run on your own machine, not inside the container.

TargetWhat it does
docker-buildBuilds the tooling image infra-automation:local. A bare make does the same.
docker-shellOpens a shell in the tooling container with the same mounts. Use it for the one-time bw login, or to run terraform/ansible-playbook by hand.
unlock-bwUnlocks the vault. Use it as eval "$(make unlock-bw)".

Terraform and whole-fleet runs​

TargetWhat it doesSecrets
provisionterraform apply -auto-approve for the hetzner-main VMs. Needs PROXMOX_JUMP_HOST=proxmox-host.Proxmox Terraform Token
waitprovision, then a 30-second waitas above
setup-allwait, then site.yml --tags setup,gitea-runner on every hetzner-main VMDocker Registry Password, Gitea Runner Registration Token, Cloudflare DNS Token, Webserver htpasswd admin, Grafana Admin Password, API Gateway Admin Secret
update-allsite.yml --tags update on every hetzner-main VM (no Terraform)same, minus the Gitea token
bootstrap-hetzner-mainsetup-proxmox-host, provision, wait, setup-allall of the above

Before running provision, wait, setup-all or bootstrap-hetzner-main, read the state warning.

Proxmox host​

The firewall targets need ADMIN_SSH_IPS and PUBLIC_INTERFACE. See Proxmox Host.

TargetWhat it doesSecrets
setup-proxmox-host-bridgesNetwork bridges (commit-confirm). Fresh installs only.
setup-proxmox-hostSSH hardening, fail2ban, upgrades, vSwitch, VM template, backup jobHetzner Storage Box
setup-proxmox-host-firewallnftables (commit-confirm)
setup-proxmox-host-robot-firewallHetzner Robot firewall. Don't run. Needs HETZNER_SERVER_IP.Hetzner Robot Webservice
setup-proxmox-host-backupStorage Box mount and the nightly vzdump jobHetzner Storage Box

hetzner-main VMs​

TargetWhat it doesSecrets
setup-docker-build / update-docker-builddocker-build base setup and GitHub runner. Pass TARGET_GITHUB_TOKEN=<token> when registering a runner.Docker Registry Password, ABAIR Github Runner
setup-gitea-runner / update-gitea-runnerGitea Actions runner on docker-buildDocker Registry Password, Gitea Runner Registration Token (setup only)
deploy-docker-registryRedeploys the registry stack only
setup-webserver / update-webservernginx, certificates, sites from networking/nginx-config/Cloudflare DNS Token, Webserver htpasswd admin
setup-api-gateway / update-api-gatewayAPI gateway stackAPI Gateway Admin Secret, Docker Registry Password, Webserver htpasswd admin, note api-gateway .env.secrets
setup-services-user / update-services-userservices-user base setupDocker Registry Password, Webserver htpasswd admin
deploy-services-user-appsDeploys every services-user appDocker Registry Password, notes <app> .env
setup-services-staff / update-services-staffservices-staff base setupDocker Registry Password, Webserver htpasswd admin
deploy-services-staff-appsDeploys every services-staff app except PlausibleDocker Registry Password, notes <app> .env
deploy-analytics-plausibleDeploys Plausible on services-staffnote analytics-plausible .env
setup-synthesis-legacy / update-synthesis-legacysynthesis-legacy stack (see its known issue)Webserver htpasswd admin

Amergin​

TargetWhat it doesSecrets
setup-amergin-hostFull host setup: NVIDIA, Docker, vSwitch, monitoring, watchdogWebserver htpasswd admin
update-amergin-hostRe-applies persistence mode, UFW, the daily Docker clean-up, Alloy, DCGM and the watchdogWebserver htpasswd admin
setup-streaming-recognition / update-…Triton streaming ASRGitea Automation Bot Token
setup-fotheidil-recognition / update-…asr-diarisation and marian-cpr. Deploy before fotheidil-api, which uses its network.Gitea Automation Bot Token, Huggingface Token Amergin (pyannote's diarisation models only)
setup-fotheidil-api / update-…Fotheidil APIGitea Automation Bot Token, Fotheidil Supabase Key, Fotheidil Supabase Service Role Key, ABAIR Subtitles Gateway Shared Secret
setup-batch-recognition / update-…batch-asr and batch-marian-cprGitea Automation Bot Token
setup-predictive-text / update-…Predictive textGitea Automation Bot Token
update-predictive-text-modelReloads the predictive-text model only
setup-synthesis / update-synthesisSpeech synthesisGitea Automation Bot Token
setup-testing-user / update-testing-userGPU testing sandboxnote users.json

Secops​

TargetWhat it doesSecrets
setup-secops-hostBase host. Use ANSIBLE_USER=root on the first run. ADMIN_SSH_IPS is optional.
setup-secops-host-firewallnftables (commit-confirm)
setup-secops-host-robot-firewallBroken. Don't run.Hetzner Robot Webservice
setup-wazuh / update-wazuhWazuh manager, indexer and dashboardWazuh Admin Password, Wazuh Dashboard Internal Password, Wazuh API Password, Wazuh Agent Registration Password
wazuh-dashboardSSH tunnel to the Wazuh dashboard (see Secops)
setup-gitea-secops / update-gitea-secopsGiteaGitea DB Password, Gitea Admin Account, Cloudflare DNS Token, note Gitea .env
setup-observability-secops / update-observability-secopsLoki, Prometheus, Grafana, Uptime KumaGrafana Admin Password, Webserver htpasswd admin, Cloudflare DNS Token, note users.json
setup-rocketchat-secops / update-rocketchat-secopsRocket.ChatRocket.Chat Admin Password, Cloudflare DNS Token
setup-secops-backupBorg backupBorg Passphrase - secops

Vaultwarden​

TargetWhat it doesSecrets
setup-vaultwarden-hostBase host. Use ANSIBLE_USER=root on the first run.
setup-vaultwarden-host-firewallnftables (commit-confirm)
lock-root-vaultwardenRemoves root's SSH access. One-way.
setup-vaultwarden / update-vaultwardenVaultwarden, nginx and the certificateVaultwarden Admin Token, Cloudflare DNS Token
setup-vaultwarden-backupBorg backupBorg Passphrase - vaultwarden

Wazuh agents​

Each target installs and enrolls the Wazuh agent on one host. Run setup-wazuh first. Every target reads the Wazuh Agent Registration Password.

enroll-wazuh-webserver, enroll-wazuh-api-gateway, enroll-wazuh-services-user, enroll-wazuh-services-staff, enroll-wazuh-synthesis-legacy, enroll-wazuh-docker-build, enroll-wazuh-scealai, enroll-wazuh-proxmox-host, enroll-wazuh-amergin, enroll-wazuh-secops-host, enroll-wazuh-vaultwarden-host

Puca​

TargetWhat it doesSecrets
setup-puca PUCA_PAT=<token>Full Puca setup, using your own GitHub token for the private recorder repoWebserver htpasswd admin
setup-puca-johnThe same, with the token from VaultwardenGithub Puca PAT, Webserver htpasswd admin

Both prompt for a sudo password (-K). See Puca → Access for where to run them from.

Variables you can pass​

VariableUsed by
PROXMOX_JUMP_HOSTprovision and anything that depends on it. Set it to proxmox-host.
ADMIN_SSH_IPSThe Proxmox, Secops and Vaultwarden firewall targets. Comma-separated, no spaces.
PUBLIC_INTERFACEThe Proxmox firewall. Use vmbr0.
HETZNER_SERVER_IPsetup-proxmox-host-robot-firewall
STORAGEBOX_HOST, STORAGEBOX_USERBackup targets. Default: u348035.your-storagebox.de / u348035.
TARGET_GITHUB_TOKENsetup-docker-build: a fresh GitHub runner registration token
ANSIBLE_USERFirst run of setup-secops-host / setup-vaultwarden-host (root)
PUCA_PATsetup-puca